package org.thread.Homework05;/*
 *@Author: gjh
 *Date: 2025/3/12 11:13
 *Describe:
 */

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class MainTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCallable man = new MyCallable("存折",3000);
        MyCallable woman = new MyCallable("银联卡",4000);

        FutureTask<Integer> f1 = new FutureTask<>(man);
        FutureTask<Integer> f2 = new FutureTask<>(woman);

        Thread t1 = new Thread(f1);
        Thread t2 = new Thread(f2);

        t1.start();
        t2.start();
    }

}
